<?php

/**
 * LlamadaProgramada form.
 *
 * @package    cronos-doctrine
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class LlamadaProgramadaForm extends BaseLlamadaProgramadaForm
{
  public function configure()
  {
      
      $this->removeField();
      
      
  }
  
  protected function removeField() {
      //Eliminar los campos del formularios  created_at y updated_at
      unset (
        $this['created_at'],
        $this['updated_at'],
        $this['llamada_id'],
        $this['llamo_id']      

      );
     
     $this->widgetSchema['empresa_id'] = new sfWidgetFormInputHidden(array(),array('value'=> sfContext::getInstance()->getUser()->getAttribute('agente_user_empresa_id')));
     
     $this->widgetSchema['categoria_id'] = new sfWidgetFormDoctrineChoice(array(
         'multiple' => false, 
         'model' => 'Categoria',
         'query' => Doctrine_Query::create()->select('c.id, c.mancheta')->from('Categoria c')->where('c.padre is null ')->orderBy('c.id asc'),
         'expanded' => false));
     $this->widgetSchema['fecha'] = new sfWidgetFormInput(array(), array('size' => 15, 'id' => 'fechaDashboard', 'readonly'=>'readonly'));
     /*$this->widgetSchema['fecha'] = new sfWidgetFormJQueryDate(array(
         'culture'=> 'es',         
         'config' => "{minDate: +1}"         
         ));*/
     $this->widgetSchema['categoria_id']->setLabel('Servicios');
     
     $this->widgetSchema['nota'] = new sfWidgetFormTextarea();
     
     $this->widgetSchema['cita_telefonica'] = new sfWidgetFormInputCheckbox(array('value_attribute_value' => 1));
     
  }
  
  
}
